FROM node:12.16.1
RUN node -v
RUN mkdir -p /usr/src/app

WORKDIR /usr/src/app

# add npm package
# COPY package.json /usr/src/app/package.json
COPY . /usr/src/app
RUN npm install -g cnpm --registry=https://registry.npm.taobao.org
RUN cnpm install
RUN npm run build
EXPOSE 7001

CMD npm start